1. Field of the Invention
The present invention relates to measuring and analyzing systems for examining operation of information processors and, more particularly, devices for measuring and analyzing operation of an information processor as a measuring object by measuring an elapsed time from when a software event to be measured occurs until another software event occurs in the information processor.
2. Description of the Related Art
Measuring devices which examine the state of operation of an information processor are roughly classified into 1) hardware monitor, 2) software monitor and 3) hybrid monitor as recited in, "Computer Performance Evaluation Methodology, Transactions on Computers", Vol. c-33, No. 12, Dec. 19, 1984.
There are the following two kinds of results obtained by measurement:
1) trace data which records operation of a computer as time series data; PA0 2) resultant data regarding a target performance evaluation item such as execution time of a specific procedure.
In general, once trace data of enough length is acquired, various kinds of performance evaluation data can be obtained by analyzing the trace data. For evaluating performance of a computer, it is therefore more desirable to obtain trace data.
One example of a system for evaluating performance of a computer based on trace data collected through measurement is disclosed in Japanese Patent Laying-Open No. 2-173841, entitled "Program Execution Time Measuring System". Although no specific means of obtaining traces is recited in this literature, any of the following problems generally occurs in obtaining such traces of instructions as described herein.
1) An overhead in measurement is increased.
2) An expensive measuring device is required.
A hardware monitor is a measuring device with a high impedance hardware probe connected to a computer to be measured for examining operation of the computer, which operation appears as a hardware signal. Because this device simply monitors a hardware signal of the measuring object computer externally, it is not at all necessary to modify software of the target computer to change operation of the same for the measurement. Measurement using a hardware monitor is therefore characterized in that an actual state of operation of a target computer can be accurately measured without disturbing operation of the computer as a measuring object. This is a great advantage that other monitors lack.
On the other hand, some hardware monitors are incapable of directly detecting a software event, such as switching of a process, which is not externally output as a hardware signal. As far as such a software event is concerned, a hardware monitor has a drawback that it can neither measure nor evaluate a software event by itself.
One example of such hardware monitors is disclosed in Japanese Patent Laying-Open No. 63-91752, entitled "System for Evaluating and Measuring Performance of Electronic Computer", which is a monitor whose objective is to obtain various kinds of performance evaluation measurement data by using a memory to be employed in a history recording mode, but not a device for obtaining trace data.
Japanese Patent Laying-Open No. 63-276638, entitled "Software Development Supporting Device", recites a device capable of gathering data indicative of a history of software execution by using hardware. This device, however, costs much because of a storage circuit equivalent to a storage device (memory) of an electronic computer used as a medium for recording a history. This device has another disadvantage that it is incapable of accurately collecting execution histories of repetitious executions of a program having the same address.
On the other hand, a software monitor is a device for examining operation of a computer to be measured by means of a software probe. The software probe is implemented by incorporating a probe instruction sequence for the operation of "extracting and recording information necessary for measurement and evaluation from a computer to be measured" in a machine language instruction sequence of a target computer (to be specifically, OS or application). There is another kind of probe implemented as a microcode instruction sequence incorporated into microcode instructions but not as a machine language instruction sequence. This kind of probe is called "microcode probe" in some instances but can be treated as a software probe in a broad sense.
Software probes are roughly classified into an event-driven type and a timer-driven type according to conditions activating a probe instruction sequence. The event-driven type is a system activated by the generation of an event to be measured (such as memory access and execution of an instruction).
The timer-driven type is a system activated at fixed time intervals by a clock interrupt etc. and is called as a sampling system. Some measurement employs a combination of event-driven and timer-driven probes.
Because of being an instruction sequence incorporated into software of a computer to be measured, the software probe has an advantage of its capability of examining contents of a memory or a register at an arbitrary address at an arbitrary time point, that is, examining software-related information. The software probe can therefore detect a software event with ease.
On the contrary, because during the execution of a probe instruction sequence, a computer as a measuring object is to execute an instruction whose execution is not originally needed, more time is required for the execution of a program than for the execution of an instruction sequence incorporating no software probe. In other words, the software probe has a shortcoming of generation of an overhead in measurement.
In general, an overhead in measurement is increased as the contents of operation conducted in a probe are more complicated and a time interval activating the probe becomes shorter.
An example of a system for measuring performance of a computer system which executes multitasking interactive processing by using this software probe is disclosed in Japanese Patent Laying-Open No. 2-139644, entitled "Computer System". This system performs measurement only by means of software and stores measurement data in a memory of a system to be measured and therefore involves the following problems.
1) When in examining in detail operation of a system to be measured, that is, when a software probe activation time becomes short, an overhead in measurement is increased.
2) Shortage of a memory capacity of a computer to be measured might adversely affect execution of a program to be measured.
3) Measurement is possible only for a short period of time until the completion of write of measurement data into a memory region ensured for recording the measurement data.
In addition, an event-driven software probe generally uses a timer which is under control of an operating device and whose precision is on the order of 10 mS for checking a current time, that is, a time of occurrence of a software event detected by the software probe. The precision of the obtained time accordingly depends on that of the timer.
On the other hand, because the timer-driven software probe is activated by clock interrupt occurring asynchronously with software operation inside a computer to be measured, it can not detect a software event, such as switching of a process, which occurs synchronously with software operation inside the computer. As a result, it is impossible by this type of software probe to obtain time of software event occurrence and an elapsed time from occurrence of one software event until that of another.
A hybrid monitor is a measuring device which employs both a hardware probe and a software probe together. A function of the software probe in this measuring device is to detect a software event and write it in a specific hardware resource, which is to convert a software event into a hardware event.
A function of the hardware probe is to monitor such a hardware event as described above and record it together with a necessary hardware signal as time series data. As compared with a software monitor requiring operation of detecting a software event and recording it as measurement data by a software probe, the hybrid monitor system which requires no recording operation has less overhead of the software probe.
Japanese Patent Laying-Open No. 62-264342, entitled "Device for Measuring Load on Computer", recites one example of a device for obtaining performance evaluation data by means of both software and hardware. To be obtained by the device is a numerical value indicative of load on a computer but not trace data.
An example of a hybrid monitor using a logic analyzer as a hardware probe and a device for recording time series data is disclosed in "Measuring Operating System Performance on Modern Micro-Processors, Performance Evaluation Review", Vol. 14, Proceedings of 1986 ACM SIGMETRICS Conference, Measuring and Modeling Computer System, pp. 193-202. A common logic analyzer employs a semiconductor memory as a recording device for the recording of time series data. This makes a time series data recording device cost more and as well as making a volume of recordable time series data be limited by a capacity of the semiconductor memory.
With a volume of measurable data being limited by a semiconductor memory capacity, a conventional hybrid monitor, which employs such a hardware tool as a logic analyzer using a semiconductor memory as a device for recording time series data, is not allowed to record operation of a computer over a long period of time.
Among conventional systems for measuring and analyzing operation of information processors, a hardware monitor has a disadvantage that it is not capable of detecting a software event to examine software operation.
A software monitor which collects sample data through sampling has a problem of incapability of measurement of a time elapsed from one software event until another. On the other hand, a software monitor which acquires a time series of software events has the following drawbacks.
1) A large measurement overhead disturbs operation of a device to be measured.
2) Because event occurrence time is ordinarily detected by a timer under control of an OS, precision of the detected time, which is on the order of 10 mS, is insufficient.
As to a conventional hybrid monitor, because of a semiconductor memory employed as a recording device for use as a time series data recording device, the time series data recording device costs much, and a limited capacity of the memory reduces a volume of data recordable in the time series data recording device. As a result, recording of a long-time operation of a computer is impossible.